package org.cying.main.util;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Token {

    private static final Token instance = new Token();
    private Integer token;

    public Integer getToken() {
        return this.token;
    }

    public void setToken(Integer token) {
        this.token = token;
    }

    @Override
    public boolean equals(Object token) {
        if (!(token instanceof Integer)) {
            log.error("token [" + token + "] is not a Integer.");
            return false;
        }
        return this.token.equals(token);
    }

    public static Token getInstance() {
        return instance;
    }

}
